function getFirst(string) {
  let len = Math.ceil(string.length / 4)
  let first = string.length % 4 === 0 ? 4 : string.length % 4

  let result = ''
  let hasAddZero = false
  const hasZero = hadZero(string)

  for (let i = 0; i < len; i++) {
    hasAddZero = result.indexOf('零') > -1
    const cur = string.substring(first + (i - 1) * 4, first + i * 4)
    result += getChinaStr(cur, len - i, hasZero, hasAddZero)
  }

  return result
}

function hadZero(string) {
  if (string.length === 1) return false
  else return string.includes('0')
}

function getChinaStr(cur, level, hasZero, hasAddZero) {
  const chinaStr = ['壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖']
  let result = ''

  let step = cur.length

  for (let k of cur) {
    if (Number(k) !== 0) {
      if (step === 4) {
        result += chinaStr[Number(k) - 1] + '仟'
      } else if (step === 3) {
        result += chinaStr[Number(k) - 1] + '佰'
      } else if (step === 2) {
        if (Number(k) - 1 !== 0) {
          result += chinaStr[Number(k) - 1] + '拾'
        } else {
          result += '拾'
        }
      } else if (step === 1) {
        result += chinaStr[Number(k) - 1]
      }
    } else {
      if (hasZero && !hasAddZero) {
        result += '零'
        hasAddZero = true
      }
    }
    step--
  }

  if (level % 3 === 0) {
    result += '亿'
  } else if (level % 3 === 2) {
    result += '万'
  }

  result = result.replace('零万', '万零')

  return result
}

function getRight(string) {
  const chinaStr = ['壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖']

  let result = ''
  if (Number(string) === 0) {
    result += '整'
  } else {
    let index = 0
    for (let k of string) {
      if (Number(k) !== 0) {
        if (index === 0) {
          result += chinaStr[Number(k) - 1] + '角'
        } else if (index === 1) {
          result += chinaStr[Number(k) - 1] + '分'
        }
      }
      index++
    }
  }

  return result
}

while ((line = readline())) {
  let first = line.split('.')[0]
  let second = line.split('.')[1]

  const hasYuan =
    first.length > 1 || (first.length === 1 && Number(first) !== 0)

  console.log(
    `人民币${getFirst(first)}${hasYuan ? '元' : ''}${getRight(second)}`
  )
}
